Skip to main content

Simulate Escrow Release

Simulates the release of funds from an escrow.

query Router($token: String!, $amount: Int, $crossChainAddresses: [CrossChainUserWithLimitInput]) {
router {
simulate_release_escrow(token: $token, amount: $amount, cross_chain_addresses: $crossChainAddresses) {
release_amounts {
amount
cross_chain_user {
limit
user {
address
chain_uid
}
}
}
remaining_amount
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://testnet.api.euclidprotocol.com/graphql' \
--data '{"query":"query Simulate_release_escrow($token: String!, $amount: Int, $crossChainAddresses: [CrossChainUserWithLimitInput]) {\n router {\n simulate_release_escrow(token: $token, amount: $amount, cross_chain_addresses: $crossChainAddresses) {\n remaining_amount\n release_amounts {\n amount\n cross_chain_user {\n user {\n chain_uid\n address\n }\n limit\n }\n }\n }\n }\n}","variables":{"token":"euclid","amount":1000,"crossChainAddresses":[{"limit":800,"user":{"address":"nibi14hcxlnwlqtq75ttaxf674vk6mafspg8x3ky6ts","chain_uid":"nibiru"}}]}}'

Open in Playground

Arguments

  • token (String!): The token Id of the token to be released.
  • amount (Int): The amount of tokens to be released from the escrows.
  • cross_chain_addresses (CrossChainUserWithLimit): The destination addresses and amount (for each address) for the tokens released.

Return Fields

FieldTypeDescription
amountStringThe amount of tokens to release.
cross_chain_userCrossChainUserWithLimitThe address and limit for the receiving address of the funds.
remaining_amountStringAny remaining tokens after the escrow releases.